using IQIGame.Onigao.GamePlay;
using NetProtocol.POD;

namespace IQIGame.Onigao.Logic
{
    public struct LevelBuffChangeParam
    {
        public LevelBuffHostType hostType;
        public BaseLevelFunctionHost host;
        public LevelBuffOperationType opType;
        public LevelNormalBuff changedBuff;
        public int removeBuffCid;

        public LevelBuffChangeParam(LevelBuffHostType hostType, BaseLevelFunctionHost host, LevelBuffOperationType opType, LevelNormalBuff changedBuff, int removeBuffCid)
        {
            this.hostType = hostType;
            this.host = host;
            this.opType = opType;
            this.changedBuff = changedBuff;
            this.removeBuffCid = removeBuffCid;
        }

        public LevelBuffChangePOD GeneratePODWithoutHostId()
        {
            LevelBuffChangePOD pod = new LevelBuffChangePOD();
            pod.hostType = (byte)hostType;
            pod.opType = (byte)opType;
            pod.addOrChangePOD = changedBuff?.GeneratePOD() as LevelBuffPOD;
            pod.removeCid = removeBuffCid;
            return pod;
        }
    }
}
